<div class='section'>
  <h3 class='title'>相册：<%=@album.name%></h2>
</div>
<br/>
<%=button_to "首页显示", {:action=>"show_on_index",:id=>@album}%>
  <%=button_to "删除相册", {:action=>"delete",:id=>@album},
  :confirm=>"删除相册同时会删除改相册的所有相片，你确定要删除吗？" %>
  <br/>
  <%= error_messages_for 'album' %>
  <fieldset>
    <legend>上传图片</legend>
    <% form_for :photo,
    :url=>{:action=>'upload_photo', :id=>@album},
    :html=>{:multipart=>true} do |form| %>
      <p>
        <label for="photo_title" >图片标题:</label>
        <%=form.text_field :title, :size=>40%>
      </p>
      <p>
        <label for="photo_image" >选择文件:</label>
        <%=file_column_field "photo", "image" %>
        <%= submit_tag "上传" %>
      </p>
    <% end %>
  </fieldset>
  <br>

  <%=render :partial=>'/album/list_photos',:object=>@album  %>